// components/guessYouLike/guessYouLike.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
  },

  /**
   * 组件的初始数据
   */
  data: {
    shopList: []
  },

  lifetimes: {
    attached() {
      wx.request({
        url: 'https://ms.viomi.com.cn/wares-web/services/prod/query/randomRecommendSkuList.json?businessType=1&plateForm=1&quantity=18',
        success: (res) => {
          this.setData({shopList: res.data.mobBaseRes.result})
        }
      })
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    handleToDetail(e) {
      wx.navigateTo({
        url: `/pages/detail/detail?skuId=${e.currentTarget.id}&plateForm=1`,
      })
    }
  }
})
